Package-level declarations

Types

Link copied to clipboard

The specific scope for the lambda overload of clippedShadow.

Link copied to clipboard

The specific scope for the lambda overload of shadowCompat.

Link copied to clipboard

The base scope interface for the lambda overloads of clippedShadow and shadowCompat. All of its mutable properties can be modified without causing recompositions.

Functions

Link copied to clipboard

Creates a dropShadow replacement with the interior clipped out.

Link copied to clipboard
fun Modifier.clippedShadow(shape: Shape, clip: Boolean = true, block: ClippedShadowScope.() -> Unit): Modifier

The lambda version of clippedShadow that allows for modification of shadow properties without recomposition.

fun Modifier.clippedShadow(elevation: Dp, shape: Shape = RectangleShape, clip: Boolean = elevation > 0.dp, ambientColor: Color = DefaultShadowColor, spotColor: Color = DefaultShadowColor): Modifier

Creates a shadow replacement with the interior artifact clipped out.

fun Modifier.clippedShadow(elevation: Dp, shape: Shape = RectangleShape, clip: Boolean = elevation > 0.dp, ambientColor: Color = DefaultShadowColor, spotColor: Color = DefaultShadowColor, colorCompat: Color = DefaultShadowColor, forceColorCompat: Boolean = false): Modifier

A clippedShadow overload that can be tinted with the library's color compat mechanism on API levels before 28, the earliest version to support the native shadow colors.

Link copied to clipboard
fun Modifier.shadowCompat(shape: Shape, clip: Boolean = true, block: ShadowCompatScope.() -> Unit): Modifier

The lambda version of shadowCompat that allows for modification of shadow properties without recomposition.

fun Modifier.shadowCompat(elevation: Dp, shape: Shape = RectangleShape, clip: Boolean = elevation > 0.dp, ambientColor: Color = DefaultShadowColor, spotColor: Color = DefaultShadowColor, colorCompat: Color = Color.Unspecified, forceColorCompat: Boolean = false): Modifier

Creates a shadow replacement that can be tinted with the library's color compat mechanism on API levels before 28, the earliest version to support the native shadow colors. If the current API level is 28 or above, shadowCompat falls back to the framework's shadow, unless forceColorCompat is true.